const Mock = require('mockjs')

const data = Mock.mock({
  'list|10': [{
    id: '@id',
    sn: 'X1NL00001234',
    model: 'CPOS X5',
    tid: '',
    merchant: 'BigPing / Sinjinshi/LuckinCoffee...',
    'status|1': ['Active', 'Inactive', 'Disable'],
    activation_time: '@datetime'
  }]
})

module.exports = [
  {
    url: '/vue-admin-template/terminal/list',
    type: 'get',
    response: config => {
      const list = data.list
      return {
        code: 0,
        data: {
          total: list.length,
          list: list
        }
      }
    }
  },
  {
    url: '/vue-admin-template/terminal/\.*',
    type: 'get',
    reponse: _ => {
      return {
        code: 0,
        data: 'success'
      }
    }
  }
]